package com.sjh.test.java8.time;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;

public class LocalDateTimeTest6 {

    public static void main(String args[]) {
        LocalDateTimeTest6 tester = new LocalDateTimeTest6();
        tester.run();
    }

    public void run() {

        LocalDateTime datetime = LocalDateTime.parse("2012-10-10T21:58:00");
        System.out.println("日期时间是:" + datetime);

        LocalDate date = LocalDate.parse("2012-10-10");
        System.out.println("日期是: " + date);

        LocalTime time = LocalTime.parse("21:58:01");
        System.out.println("时间是: " + time);
    }
}
